f62ca2ec77308264209f6a272f2b158b5b1c0854,navigation-formats/src/main/java/slash/navigation/base/BaseRoute.java,BaseRoute,removeDuplicates,#,225
Before Change
int index = 0;
while (index < positions.size()) {
P next = positions.get(index);
if (previous != null && (!next.hasCoordinates() || next.calculateDistance(previous) <= 0.0)) {
positions.remove(index);
} else
index++;
After Change
int index = 0;
while (index < positions.size()) {
P next = positions.get(index);
Double nextDistance = next.calculateDistance(previous);
if (previous != null && (!next.hasCoordinates() || isEmpty(nextDistance) || nextDistance <= 0.0)) {
positions.remove(index);
} else
index++;